package com.design.pattern.createmode.singleton;

/**
 * 创建型模式-单例模式-饿汉模式1
 * @author yll
 * @version 1.0.0
 * @date 2024/03/14 14：42
 * @desc 单例实例在类装载的时候进行创建，是线程安全的
 * */
public class SingletonExample_02_01 {

    private SingletonExample_02_01(){}

    private static SingletonExample_02_01 singleton = new SingletonExample_02_01();

    public static SingletonExample_02_01 getInstance(){
        return singleton;
    }
}
